package org.ipb.controller.modul.pegawai;

import org.ipb.model.Pegawai;

import util.hibernate.DAO;

import com.opensymphony.xwork2.ActionSupport;

public class ActionObject extends ActionSupport {
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;

	private Pegawai pegawai;
	private int id;

	public String execute() {
		DAO<Integer> dao = new DAO<Integer>();
		dao.createCriteria(Pegawai.class);
		dao.addFilter("eq", "id", id);
		pegawai = (Pegawai) dao.findUnique();
		dao.close();
		return SUCCESS;
	}

	public Pegawai getPegawai() {
		return pegawai;
	}

	public void setPegawai(Pegawai pegawai) {
		this.pegawai = pegawai;
	}

	public int getId() {
		return id;
	}

	public void setId(int id) {
		this.id = id;
	}

}
